Skip to content

Feature A/C — Fence native PR execution to the reviewed head (#1199) - #1267

Closed
oxa-agent[bot] wants to merge 21 commits into
mainfrom
agent/1199-reviewed-native-execution
Closed

oxa-agent[bot] wants to merge 21 commits into
mainfrom
agent/1199-reviewed-native-execution

Conversation

@oxa-agent

@oxa-agent oxa-agent Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Current exact head: 62de1e960b7f1abc065ed8f7793d9463891a8245. This merge resolves the two conflicts with the landed native queue. The shared spool reader validates the full reviewed binding before packet movement, and planning uses the same binding rechecked against runnable Claims. Both existing reviewed test fixtures were preserved.

Selected lane passed 1,664/1,664 on x86_64 and ARM64, zero skips, for oxa-cli, oxa-parity and oxa-work. Both job logs show issue completion, exact reviewed execution, refusal before model use and same-PR branch handoff. Draft checks passed. This composed head remains Draft while the standalone owner repair #1265 qualifies and lands.


T2. Feature A/C, #1017 and #1199, #307 native queue and assignment execution.

The runner validates the retained binding at packet take and task materialization. It carries the PR number and reviewed SHA separately from the canonical attempt ID. Common admission checks direct JSON tasks too. Reviewed execution uses the existing exact-head checkout fence and freezes acceptance against the reviewed merge base.

The tests-first lane reproduced the valid PR binding refusal on both architectures at d757fa39. At 65e45e59, the queue correctly refused to settle the advanced-branch case, but its outer event omitted the checkout reason. The fixture at 960b2178 checks that reason in the durable task record.

Hosted lane passed 1,551 tests on each architecture at 960b2178fd9f5c58702b54d02cdb05c914d2b502. Both logs pass the first reviewed PR checkout and settlement, missing/mismatched/advanced-head refusal before model use, and the original issue whole-job/replay control. Draft checks passed.

Current tests-first follow-up 042f75bd publishes the second reviewed round in the existing protected refill/native CLI fixture. It requires a distinct original lease and exact reviewed SHA for each round, release after both finishes, and byte-for-byte preservation of the first checkpoint. The first-round receipt above is historical. This draft remains gated on the typed lineage repair in the owner lane.

Two-round before-fix lane at 042f75bd failed only the second reviewed-round completion on each architecture, after passing the first and admitting the distinct new lease generation. Draft checks passed. Owner repair handoff.

Main merge fec336c0 resolves the conflict from #1279 in queue/native.rs. Both existing isolated lock-test guards remain. The seven-file reviewed-source patch has identical added and removed lines, and the two-attempt CLI fixture is byte-identical to the before head. Current hosted lane and draft checks completed. The typed lineage dependency remains with #1265.

On merge head fec336c0, draft checks passed. The hosted lane ran 1,577 tests on each architecture. The only failure on either architecture was the second reviewed attempt at work_cli.rs:467, after distinct generation 2 entered execution. The queue reported the same whole-task finish refusal as the tests-first head.

Main merge 55188d42 resolves the real #1285 fixture conflict. The native CLI now supplies the protected host and explicit prepared-issue branch absence, and checks the stored host. The accepted issue, reviewed-source refusals, two reviewed attempts and original lease checks are preserved. Hosted lane and draft checks completed. Draft checks passed. Each architecture ran 1,593 tests with one failure, the second reviewed attempt at work_cli.rs:513. Generation 2 reached native execution, then failed the whole-task finish gate. The owner lineage dependency remains #1265.

a05f2c7f35063b3922c7d93fe890043331bef3d2 resolves GitHub's real github.rs conflict after #1306 landed. The shared accessor and its tests match the landed source. This merge keeps the frozen-base helper and the full reviewed execution patch, with all seven former owned files byte-identical to the preceding head. The new main #1307 isolated test also remains intact. Hosted lane · Draft checks. #1265 remains the owner lineage dependency.

Both architectures at a05f2c7f ran 1,602 tests and passed 1,601. The sole failure is the second reviewed attempt at work_cli.rs:513, where native execution refuses whole-task finish observation. Draft checks passed. The owner lineage repair in #1265 remains the prerequisite to qualifying both rounds.

Composed head 8c7bc8136c8a881fcf21535ad8ffe316e0e4570c imports the exact owner lineage dependency #1265 at b561b86912973933caba5a75c7f8c4bcd7009d7d. The owner source uses the landed typed reviewed PR number for same-PR handoff. The existing two-round protected native CLI fixture and all seven reviewed-execution owned files remain byte-identical to a05f2c7f. The three owner repair files remain byte-identical to b561b869. New hosted lane · Draft checks. The composition stays draft while the owner repair qualifies independently.

n0rpan and others added 3 commits November 18, 2026 02:27
The queue scan applied MAX_QUEUE_FILES only to visible regular .json
inputs; hidden, non-JSON and non-regular entries were read and skipped
without limit on every watch iteration. Each entry returned by read_dir
now counts against MAX_QUEUE_ENTRIES (4096) before filtering, and the scan
stops with an error past it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Each native board admission gets its own task id (it includes the lease
generation) and therefore its own worktree. A later attempt on the same
branch could not add its worktree while the finished earlier attempt
still had the branch checked out.

The reviewed-PR handoff now also covers native attempts: when the branch
is attached to a finished, clean native attempt's worktree in the same
worktree directory, that worktree's HEAD is detached at the branch tip and
the new attempt checks out the branch. The earlier worktree's files and
receipt are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@oxa-agent oxa-agent Bot mentioned this pull request Nov 18, 2026
@oxa-agent

oxa-agent Bot commented Nov 18, 2026

Copy link
Copy Markdown
Contributor Author

Published extraction: #1306, branch agent/1267-reviewed-source-api, exact 45c7517, base 752543040b1eb56cc210889fe6ddaa0172d0f0a1.

Following Lead's exact handoff, the existing oxa-work/src/github.rs implementation is now isolated:

// crate-visible; usable directly by the existing tree.rs owner consumer
impl Task {
    pub(crate) fn reviewed_source(&self) -> Option<(u64, &str)>;
    pub(crate) fn reviewed_head(&self) -> Option<&str>;
}
// exported as oxa_work::ReviewedPullRequest
pub struct ReviewedPullRequest { pub number: u64, pub head: String }
// Task's supporting metadata, serde-default and omitted when absent:
pub reviewed_pull_request: Option<ReviewedPullRequest>

The runner-guidance prefix is required. Explicit source requires a positive PR number and canonical 40/64-digit object ID; legacy pr-... remains 40-digit and explicit metadata on a legacy ID must match exactly. The common invalid-source validation, six existing task-literal None initializers, and Lead's existing SHA-256/legacy control are included. Absent metadata keeps legacy checkpoint JSON unchanged.

Only 66 additions + 9 deletions = 75 lines, five Rust files. reviewed_base, native source population/admission, tree.rs lineage/checkout, and work_cli.rs runtime/two-round controls remain with Lead and the existing #1265 owner. No Claims/store/activation changes.

CI pending, not qualified: selected lane44241123776 exact45c75171 has one 120-second observer. Local formatting/diff checks passed; no local builds/tests. Full required CI, current connected Code/security and normal exact-source read remain gates. The published extraction can now be composed by the existing owner without waiting for Lead's whole runtime PR; this is not permission to bypass their normal gates or claim the two-round path finished.

n0rpan and others added 5 commits November 18, 2026 06:38
Native attempts on the same pull request have different task IDs, so the
review-round handoff no longer compares task-ID prefixes. Under the prior
task's lock it requires the prior's typed reviewed source (reviewed_source)
to name the same pull request number; the reviewed head may differ between
rounds. A prior attempt for a different pull request is refused.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@oxa-agent

oxa-agent Bot commented Nov 18, 2026

Copy link
Copy Markdown
Contributor Author

At exact composed head 8c7bc8136c8a881fcf21535ad8ffe316e0e4570c, the hosted lane ran 1,606 tests per architecture. Both jobs passed 1,605, with no skips. The only reported failure is #1265's work_native_handoff::native_attempts_on_one_reviewed_pull_request_hand_over_its_branch. The third, different-PR case reaches the model and fails with engine_http after the mock turns are exhausted, instead of stopping at the lineage check. The protected refill two-round test is no longer a reported failure. Draft checks passed. The composed lane remains red.

The composed authority explains the mismatch. The owner fixture seeds reviewed metadata only in Task JSON and passes a NativeBinding::new with no reviewed head. Native task materialization deliberately takes the reviewed identity from the admitted binding, so the fixture loses its reviewed lineage on this composition. The third attempt therefore enters generic native lineage. This is a fixture/source contract mismatch on the exact composition, not permission to weaken the bound-source fence.

Please route to #1265's existing fixture owner. The direct lineage test can build its synthetic typed Task with the existing canonical attempt ID and github_runner_guidance without calling the incompatible materializer, keeping distinct PR 42/43 evidence. Simply switching that fixture to NativeBinding::new_reviewed and still calling the older standalone materializer would fail before #1267 lands because it reconstructs an unreviewed binding. Lead retains the protected refill/native CLI fixture and will qualify the full composition after the owner fix. No owner file edits from Lead.

@oxa-agent

oxa-agent Bot commented Nov 18, 2026

Copy link
Copy Markdown
Contributor Author

Composition observation on exact 8c7bc8136c8a881fcf21535ad8ffe316e0e4570c, not an implementation takeover or review request. Lane44247389701 is terminal FAILURE. Both x86_64 and ARM64 ran1,606 tests:1,605 passed, one failed, zero skips. The sole failure is work_native_handoff::native_attempts_on_one_reviewed_pull_request_hand_over_its_branch, at the third-attempt detail assertion, with engine_http / script exhausted: unexpected extra request. I read only each failed job tail100. No JUnit artifact is published, so I am not claiming a separately inspected named positive receipt for the reviewed native fixture.

The exact source explains the mismatch. In the owner fixture, attempt() always creates NativeBinding::new(7, ..., branch), with no reviewed head, then sets only the Task JSON reviewed PR metadata to42 or43. In the composed native_task materializer, the authoritative binding supplies/replaces Task.reviewed_pull_request. This issue binding therefore clears the JSON-only PR metadata. The third attempt is treated as ordinary native branch continuation and reaches the empty mock script; it does not exercise typed foreign-PR lineage refusal.

The fixture needs an authoritative reviewed binding with the intended PR number and reviewed head when it declares a reviewed attempt, using the already published NativeBinding::new_reviewed, before materialization. Keep the third different-PR refusal, no-model expectation, branch/receipt preservation and all original controls; do not loosen production admission or remove the assertion. Lead/owner1265 retain the source writer and current-head CI/review gates.

Read-only preservation audit: the five remaining reviewed-execution diff files against landed3cd are byte-identical a05f2c7→8c7bc813, including the full two-round work_cli fixture. The three owner repair files (tree.rs,queue.rs,work_native_handoff.rs) are byte-identical to b561b86. Other composition changes are the imported main ancestry. The typed prior PR number is read under the prior task lock; finished/clean worktree, exact reviewed head and immutable original receipts remain guarded. This composition is not green or globally accepted.

n0rpan and others added 5 commits November 18, 2026 07:37
…ion receipts

A board-* task ID and the runner prompt prefix are ordinary task input, so
they did not prove that an earlier attempt was a native admission. The
native path now passes its NativeBinding to plan_native, which checks it
against the task and persists it in the attempt's checkpoint. A branch is
handed over only when the earlier attempt persisted a valid receipt and the
current attempt's receipt names the same source number, branch and kind
(reviewed or not); an earlier board-* attempt without a receipt, or a
current task without one, is refused. Ordinary reviewed rounds without
receipts keep the typed pull request number check.

The handoff fixture now runs both attempts through LockedTask::plan_native
with NativeBinding::new_reviewed for the reviewed pull request and checks
that forged tasks without a receipt are refused.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@oxa-agent

oxa-agent Bot commented Nov 18, 2026

Copy link
Copy Markdown
Contributor Author

New composition 3b99584 uses owner #1265 exact dd1f48c. Its fixture now builds real reviewed bindings and exercises the admitted-task path. The one conflict in the real CLI fixture keeps both the owner launch/replay assertions and the two-round frozen-head, branch, original lease and receipt controls. The owner lineage file and fixture are byte-identical to dd1f48c. Own delta from dd1 is 396 changed lines across five files. Fresh hosted CI is required. No owner-source edits, merge clearance or activation.

@oxa-agent

oxa-agent Bot commented Nov 18, 2026

Copy link
Copy Markdown
Contributor Author

Current exact head 994b71a also resolves the two verified main conflicts. The native caller passes both the owner admission receipt into planning and the landed activity observer into execution. PR context uses the landed #1333 pure formatter with the frozen reviewed-base helper. Owner lineage/fixture and the real two-round CLI tests are unchanged from the prior composition. GitHub now reports mergeable. Fresh lane 44259842552 and draft checks 44259850858; no activation.

@oxa-agent

oxa-agent Bot commented Nov 18, 2026

Copy link
Copy Markdown
Contributor Author

Exact 994b71a hosted lane 44259842552 passed on x86 and ARM, 1,632 tests each with zero skips. The real CLI issue completion, two-round exact reviewed PR execution, and corrected owner branch handoff fixture passed on each architecture. Draft checks 44259850858 passed. This is composed qualification against exact #1265 dd1f48c. The owner dependency is still open and must land independently before this PR’s own landing qualification. No queue or activation action.

@oxa-agent oxa-agent Bot added the parked Closed without merging; work kept at tag archive/pr-N, listed in the parked-work index label Nov 18, 2026
@oxa-agent

oxa-agent Bot commented Nov 18, 2026

Copy link
Copy Markdown
Contributor Author

Parked under the owner’s Phase A direction. The standalone reviewed lineage repair #1265 remains unresolved. Reuse the exact binding and successful two-round fixture under #1199 and #1338. The original branch and exact archive are retained. Index entry in #946.

@oxa-agent oxa-agent Bot closed this Nov 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

parked Closed without merging; work kept at tag archive/pr-N, listed in the parked-work index

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant